package IA;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 *
 * @author Jeremy
 */
public class MenuItem {
    private String name;
    private String description;
    private Double basePrice;
    private Double currentPrice;
    private Integer dishesAvailable;
    private Integer dishesOrdered;
    private Integer prepTime;
    private Double rating;
    private List<String> commentList;
    
    public MenuItem(String name, String description, Double basePrice, 
            Double currentPrice, Integer dishesAvailable, Integer prepTime){
        this.name = name;
        this.description = description;
        this.basePrice = basePrice;
        this.currentPrice = currentPrice;
        this.dishesAvailable = dishesAvailable;
        dishesOrdered = 0;
        this.prepTime = prepTime;
        this.rating = 2.5;
        this.commentList = new ArrayList();
    }
    
    public void decrementDishesAvail(){
        dishesAvailable--;
        dishesOrdered++;
    }
    
    public String getName() {
        return name;
    }
    public void setName(String name){
        this.name = name;
    }
    public String getDescription(){
        return description;
    }
    public void setDescription(String description){
        this.description = description;
    }
    public Double getCurrentPrice() {
        return currentPrice;
    }
    public void setCurrentPrice(Double price){
        currentPrice = price;
    }
    public Double getBasePrice() {
        return basePrice;
    }
    public void setBasePrice(Double price){
        basePrice = price;
    }
    public Integer getDishesAvailable(){
        return dishesAvailable;
    }
    public void setDishesAvailable(Integer dishesAvailable){
        this.dishesAvailable = dishesAvailable;
    }
    public Integer getDishesOrdered() {
        return dishesOrdered;
    }
    public void setDishesOrdered(Integer dishesOrdered) {
        this.dishesOrdered = dishesOrdered;
    }
    public Integer getPrepTime(){
        return prepTime;
    }
    public void setPrepTime(Integer prepTime){
        this.prepTime = prepTime;}
    public void setRating(Double rating){
        this.rating = rating;
    }
    public Double getRating(){
        return rating;
    }
    
    public List<String> getCommentList() {
        return commentList;
    }

    @Override
    public String toString(){
        return name+"/"+description+"/"+currentPrice+"/"+rating;}
}
